import React, {Component} from 'react';
import styles from './index.less';
import PropTypes from "prop-types";

/**
 * 副标题
 */
class ChildTitleLayout extends Component {

  constructor(props) {
    super(props);
  }

  render() {
    let { text } = this.props;
    return (
      <React.Fragment>
        <div className={styles.title}>
          <div className={styles.background}>
            <div className={styles.content}>
              {text}
            </div>
          </div>
        </div>
      </React.Fragment>
    );
  }
}

ChildTitleLayout.propTypes = {
  text: PropTypes.string
}

ChildTitleLayout.defaultProps = {
  text: '副标题'
}

export default ChildTitleLayout;
